package com.sutuijingling.bean;

import com.sutuijingling.utils.e;
import java.util.HashSet;
import java.util.Set;

public class SearchBean {
    static String[] commCityArray = new String[]{"北京", "上海", "广州", "深圳", "杭州", "温州", "宁波", "南京", "苏州", "济南", "青岛", "大连", "无锡", "合肥", "天津", "长沙", "武汉", "郑州", "石家庄", "成都", "重庆", "西安", "昆明", "南宁", "福州", "厦门", "南昌", "东莞", "沈阳", "长春", "哈尔滨"};
    static Set commCitySet = new HashSet();
    static String[] commProvinceArray = new String[]{"安徽", "福建", "甘肃", "广东", "广西", "贵州", "海南", "河北", "河南", "湖北", "湖南", "江苏", "黑龙江", "江西", "吉林", "辽宁", "内蒙古", "宁夏", "青海", "山东", "山西", "陕西", "四川", "西藏", "新疆", "云南", "浙江", "香港", "澳门", "台湾"};
    static Set commProvinceSet = new HashSet();
    static int trimSize = 28;
    String area;
    String city;
    private boolean customProtected = false;
    boolean dianzan = false;
    String dianzanNicks = "";
    private boolean freeDelivery = false;
    private boolean globleSale = false;
    private boolean goldMoney = false;
    private boolean huabeifenqi = false;
    boolean huobi = false;
    int huobiMaxPrice = 0;
    int huobiMinPrice = 0;
    int huobiNum = 0;
    private boolean huodaofukuai = false;
    Long id;
    private boolean ignoreLowRank = false;
    boolean isAddToCart = false;
    boolean isMultipleSku = false;
    boolean isNeedStored = false;
    boolean isTKLItem = false;
    boolean isTaoqianggou = false;
    boolean isZhanXian = false;
    boolean isZhiTongChe = false;
    boolean justTklInto = false;
    String keyword;
    int mainItemSeconds = 6;
    String maxPrice;
    String minPrice;
    private boolean mobileSpecial = false;
    String province;
    private boolean qitiantuihuo = false;
    private boolean salenumfirst = false;
    String shopName;
    boolean shopStore = false;
    boolean taobaoke = false;
    boolean taokeItem = false;
    private boolean tianmao = false;
    String title;
    String title1;
    String title2;
    String tklItemUrl;
    private boolean tongyongpaixu = false;
    int viewMark = 0;
    String wangwang;
    boolean weitao = false;
    boolean zxClickOther = false;

    static {
        int i = 0;
        for (Object add : commCityArray) {
            commCitySet.add(add);
        }
        String[] strArr = commProvinceArray;
        int length = strArr.length;
        while (i < length) {
            commProvinceSet.add(strArr[i]);
            i++;
        }
    }

    public SearchBean(String str, String str2, String str3, String str4, Long l, String str5, String str6, boolean z, int i, String str7) {
        this.keyword = str;
        this.minPrice = str2;
        this.maxPrice = str3;
        this.area = str4;
        this.title = str7;
        this.id = l;
        this.wangwang = str5;
        this.shopName = str6;
        this.isMultipleSku = z;
        this.mainItemSeconds = i;
    }

    public SearchBean(String str, String str2, String str3, String str4, String str5, Long l, String str6, String str7, String str8, String str9, boolean z, int i) {
        this.keyword = str;
        this.minPrice = str2;
        this.maxPrice = str3;
        this.area = str4;
        this.title = str5;
        this.id = l;
        this.wangwang = str6;
        this.shopName = str7;
        this.province = str8;
        this.city = str9;
        this.isMultipleSku = z;
        this.mainItemSeconds = i;
    }

    public String getArea() {
        return this.area;
    }

    public String getCity() {
        return this.city;
    }

    public String getDianzanNicks() {
        return this.dianzanNicks;
    }

    public int getHuobiMaxPrice() {
        return this.huobiMaxPrice;
    }

    public int getHuobiMinPrice() {
        return this.huobiMinPrice;
    }

    public int getHuobiNum() {
        return this.huobiNum;
    }

    public Long getId() {
        return this.id;
    }

    public String getKeyword() {
        return this.keyword;
    }

    public int getMainItemSeconds() {
        return this.mainItemSeconds;
    }

    public String getMaxPrice() {
        return this.maxPrice;
    }

    public String getMinPrice() {
        return this.minPrice;
    }

    public String getProvince() {
        return this.province;
    }

    public String getShopName() {
        return this.shopName;
    }

    public String getTargetArea() {
        if (this.city == null) {
            this.city = e.a;
        }
        this.city = this.city.replace("市", "");
        if (commCitySet.contains(this.city)) {
            return this.city;
        }
        if (this.province == null) {
            this.province = e.a;
        }
        this.province = this.province.replace("省", "");
        return commProvinceSet.contains(this.province) ? this.province : null;
    }

    public String getTitle() {
        return this.title;
    }

    public String getTitle1() {
        return this.title1;
    }

    public String getTitle2() {
        return this.title2;
    }

    public String getTklItemUrl() {
        return this.tklItemUrl;
    }

    public int getViewMark() {
        return this.viewMark;
    }

    public String getWangwang() {
        return this.wangwang;
    }

    public boolean hasArea() {
        return (e.a(this.city) && e.a(this.province)) ? false : true;
    }

    public boolean hasPriceInterval() {
        return (e.a(this.minPrice) && e.a(this.maxPrice)) ? false : true;
    }

    public boolean isAddToCart() {
        return this.isAddToCart;
    }

    public boolean isCustomProtected() {
        return this.customProtected;
    }

    public boolean isDianzan() {
        return this.dianzan;
    }

    public boolean isFreeDelivery() {
        return this.freeDelivery;
    }

    public boolean isGlobleSale() {
        return this.globleSale;
    }

    public boolean isGoldMoney() {
        return this.goldMoney;
    }

    public boolean isHuabeifenqi() {
        return this.huabeifenqi;
    }

    public boolean isHuobi() {
        return this.huobi;
    }

    public boolean isHuodaofukuai() {
        return this.huodaofukuai;
    }

    public boolean isIgnoreLowRank() {
        return this.ignoreLowRank;
    }

    public boolean isJustTklInto() {
        return this.justTklInto;
    }

    public boolean isMobileSpecial() {
        return this.mobileSpecial;
    }

    public boolean isMultipleSku() {
        return this.isMultipleSku;
    }

    public boolean isNeedStored() {
        return this.isNeedStored;
    }

    public boolean isQitiantuihuo() {
        return this.qitiantuihuo;
    }

    public boolean isSalenumfirst() {
        return this.salenumfirst;
    }

    public boolean isShopStore() {
        return this.shopStore;
    }

    public boolean isTKLItem() {
        return this.isTKLItem;
    }

    public boolean isTaobaoke() {
        return this.taobaoke;
    }

    public boolean isTaokeItem() {
        return this.taokeItem;
    }

    public boolean isTaoqianggou() {
        return this.isTaoqianggou;
    }

    public boolean isTianmao() {
        return this.tianmao;
    }

    public boolean isTongyongpaixu() {
        return this.tongyongpaixu;
    }

    public boolean isViewFirstShop() {
        return this.viewMark <= 0 || (this.viewMark & 8) > 0;
    }

    public boolean isVisitAllItems() {
        return this.viewMark <= 0 || (this.viewMark & 64) > 0;
    }

    public boolean isVisitComment() {
        return this.viewMark <= 0 || (this.viewMark & 128) > 0;
    }

    public boolean isVisitItemCategory() {
        return this.viewMark <= 0 || (this.viewMark & 16) > 0;
    }

    public boolean isVisitMainShop() {
        return this.viewMark <= 0 || (this.viewMark & 32) > 0;
    }

    public boolean isVisitOtherItem() {
        return (this.viewMark & 256) > 0;
    }

    public boolean isVisitiItemParams() {
        return this.viewMark <= 0 || (this.viewMark & 2) > 0;
    }

    public boolean isVisitiShopRecommend() {
        return this.viewMark <= 0 || (this.viewMark & 4) > 0;
    }

    public boolean isWeitao() {
        return this.weitao;
    }

    public boolean isZhanXian() {
        return this.isZhanXian;
    }

    public boolean isZhiTongChe() {
        return this.isZhiTongChe;
    }

    public boolean isZxClickOther() {
        return this.zxClickOther;
    }

    public void setAddToCart(boolean z) {
        this.isAddToCart = z;
    }

    public void setArea(String str) {
        this.area = str;
    }

    public void setCity(String str) {
        this.city = str;
    }

    public void setCustomProtected(boolean z) {
        this.customProtected = z;
    }

    public void setDianzan(boolean z) {
        this.dianzan = z;
    }

    public void setDianzanNicks(String str) {
        this.dianzanNicks = str;
    }

    public void setFreeDelivery(boolean z) {
        this.freeDelivery = z;
    }

    public void setGlobleSale(boolean z) {
        this.globleSale = z;
    }

    public void setGoldMoney(boolean z) {
        this.goldMoney = z;
    }

    public void setHuabeifenqi(boolean z) {
        this.huabeifenqi = z;
    }

    public void setHuobi(boolean z) {
        this.huobi = z;
    }

    public void setHuobiMaxPrice(int i) {
        this.huobiMaxPrice = i;
    }

    public void setHuobiMinPrice(int i) {
        this.huobiMinPrice = i;
    }

    public void setHuobiNum(int i) {
        this.huobiNum = i;
    }

    public void setHuodaofukuai(boolean z) {
        this.huodaofukuai = z;
    }

    public void setId(Long l) {
        this.id = l;
    }

    public void setIgnoreLowRank(boolean z) {
        this.ignoreLowRank = z;
    }

    public void setJustTklInto(boolean z) {
        this.justTklInto = z;
    }

    public void setKeyword(String str) {
        this.keyword = str;
    }

    public void setMainItemSeconds(int i) {
        this.mainItemSeconds = i;
    }

    public void setMaxPrice(String str) {
        this.maxPrice = str;
    }

    public void setMinPrice(String str) {
        this.minPrice = str;
    }

    public void setMobileSpecial(boolean z) {
        this.mobileSpecial = z;
    }

    public void setMultipleSku(boolean z) {
        this.isMultipleSku = z;
    }

    public void setNeedStored(boolean z) {
        this.isNeedStored = z;
    }

    public void setProvince(String str) {
        this.province = str;
    }

    public void setQitiantuihuo(boolean z) {
        this.qitiantuihuo = z;
    }

    public void setSalenumfirst(boolean z) {
        this.salenumfirst = z;
    }

    public void setShopName(String str) {
        this.shopName = str;
    }

    public void setShopStore(boolean z) {
        this.shopStore = z;
    }

    public void setTKLItem(boolean z) {
        this.isTKLItem = z;
    }

    public void setTaobaoke(boolean z) {
        this.taobaoke = z;
    }

    public void setTaokeItem(boolean z) {
        this.taokeItem = z;
    }

    public void setTaoqianggou(boolean z) {
        this.isTaoqianggou = z;
    }

    public void setTianmao(boolean z) {
        this.tianmao = z;
    }

    public void setTitle(String str) {
        this.title = str;
    }

    public void setTitle1(String str) {
        this.title1 = str;
    }

    public void setTitle2(String str) {
        this.title2 = str;
    }

    public void setTklItemUrl(String str) {
        this.tklItemUrl = str;
    }

    public void setTongyongpaixu(boolean z) {
        this.tongyongpaixu = z;
    }

    public void setViewMark(int i) {
        this.viewMark = i;
    }

    public void setWangwang(String str) {
        this.wangwang = str;
    }

    public void setWeitao(boolean z) {
        this.weitao = z;
    }

    public void setZhanXian(boolean z) {
        this.isZhanXian = z;
    }

    public void setZhiTongChe(boolean z) {
        this.isZhiTongChe = z;
    }

    public void setZxClickOther(boolean z) {
        this.zxClickOther = z;
    }

    public String toString() {
        return "SearchBean [keyword=" + this.keyword + ", minPrice=" + this.minPrice + ", maxPrice=" + this.maxPrice + ", area=" + this.area + ", title=" + this.title + ", id=" + this.id + ", wangwang=" + this.wangwang + ", shopName=" + this.shopName + ", province=" + this.province + ", city=" + this.city + ", isMultipleSku=" + this.isMultipleSku + "，isNeedStored" + this.isNeedStored + ", mainItemSeconds=" + this.mainItemSeconds + "]";
    }

    public void trimPrice() {
        System.out.println("-- origin price [" + this.minPrice + "] and  [" + this.maxPrice + "] ");
        if (!e.a(this.minPrice)) {
            int indexOf = this.minPrice.indexOf(46);
            if (indexOf > 0) {
                this.minPrice = this.minPrice.substring(0, indexOf);
            }
        }
        if (!e.a(this.maxPrice)) {
            this.maxPrice = String.valueOf(Math.round(Double.parseDouble(this.maxPrice) + 0.49d));
        }
        if (e.a(this.maxPrice) && this.maxPrice.equals(this.minPrice)) {
            this.maxPrice = String.valueOf(Integer.parseInt(this.minPrice) + 1);
        }
        System.out.println("<> new price [" + this.minPrice + "] and  [" + this.maxPrice + "] ");
    }

    public String trimSearchTitle() {
        return this.title.length() > trimSize ? this.title.substring(0, trimSize) : this.title;
    }
}
